import 'package:flutter/material.dart';
import 'package:carousel_slider/carousel_slider.dart';
import 'package:sonora/Screens/Guild/components/guild_frame.dart';
import 'package:sonora/components/background.dart';

class GuildScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        debugShowCheckedModeBanner: false,
        // home: GuildScreen(),
        home: ListView(
          padding: EdgeInsets.only(top: 0),
          children: [
            CarouselSlider(
              items: [
                Background(
                  child: GuildFrame(
                    icon:'assets/icons/right.png',
                    description1:'Explore captivating performances from ',
                    description2:'handpan players worldwide.',
                    press: () {
                      print('1');
                    },
                  ),
                  bgImage: "assets/images/guild_bg.png",
                ),
                Background(
                  child: GuildFrame(
                    icon:'assets/icons/right.png',
                    description1:'Join an interactive community of ',
                    description2:'handpan enthusiasts.',
                    press: () {
                      print('2');
                    },
                  ),
                  bgImage: "assets/images/guild_bg2.png",
                ),
                Background(
                  child: GuildFrame(
                    icon:'assets/icons/go.png',
                    description1:'Connect with other handpan musicians',
                    description2:'and exchange insights.',
                    press: () {
                      print('3');
                    },
                  ),
                  bgImage: "assets/images/guild_bg3.png",
                ),
                //1st Image of Slider
              ],

              //Slider Container properties
              //carousel Slider flutter
              options: CarouselOptions(
                height: MediaQuery.of(context).size.height,
                enlargeCenterPage: true,
                autoPlay: true,
                aspectRatio: 16 / 9,
                autoPlayCurve: Curves.fastOutSlowIn,
                autoPlayInterval: Duration(seconds: 2),
                enableInfiniteScroll: true,
                autoPlayAnimationDuration: Duration(milliseconds: 800),
                viewportFraction: 1.0,
              ),
            ),
          ],
        )
      );
  }
}
